#ifndef _LED_H
#define _LED_H

// 灯光模式枚举
typedef enum
{
    LIGHT_MODE_OFF = 0,     // 关闭
    LIGHT_MODE_CONSTANT,    // 常亮
    LIGHT_MODE_BREATH,      // 呼吸灯
    LIGHT_MODE_FLOW,        // 流水灯
    LIGHT_MODE_COUNT        // 模式总数
} light_mode_t;

#define KEY_DEBOUNCE_TIME 10
#define BREATH_MAX 100
#define BREATH_MIN 0
#define BREATH_STEP 1
#define LEVEL_COUNT 5

extern volatile  int16_t light;
extern volatile light_mode_t current_mode;
extern volatile uint8_t current_level;
extern volatile int8_t breath_direction;
extern volatile uint8_t flow_position;

#endif